import { getRequest, postRequest } from '/src/lib/axios';
const baseUrl = "/cctvApi/v1";
import { localRead } from '/@/utils/local-util';
import LocalStorageKeyConst from '/@/constants/local-storage-key-const.js';
const token = localRead(LocalStorageKeyConst.CCTV_TOKEN);

export function login(number) {
  return postRequest(
    baseUrl + '/login',
    {
      captcha: "",
      captcha_id: 0,
      password: "8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918",
      username: "admin",
    },
    {},
    {
      authorization: "Bearer null"
    }
  )
}

// 通道心跳
export function playStart(channel, number) {
  return getRequest(
    baseUrl + '/live/play/start/' + channel,
    {},
    {
      "authorization": token
    }
  )
}
